#ifndef _FILESYSTEMERROR_H_
#define _FILESYSTEMERROR_H_

#include <exception>
#include <string>

using std::exception;
using std::string;

#include "file.h"
#include "folder.h"

namespace Tubox {
//FIXME
class FileSystemError : public exception {
public:
	FileSystemError(const string& error,
									const File& file, const File& secondFile=File())
	: error(error), file(file), secondFile(secondFile) { }
	FileSystemError(const string& error,
									const Folder& folder, const Folder& secondFolder=Folder())
	: error(error), folder(folder), secondFolder(secondFolder) { }

	virtual ~FileSystemError() throw() { }
	virtual const char* what() const throw() {
		return error.c_str();
	}
	File getFile() { return file; }
	File getSecondFile() { return secondFile; }
	Folder getFolder() { return folder; }
	Folder getSecondFolder() { return secondFolder; }
private:
	string error;
	File file;
	File secondFile;
	Folder folder;
	Folder secondFolder;
};

}

#endif // _FILESYSTEMERROR_H_
